package com.ytz.controller;


import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.concurrent.TimeUnit;

@RestController
@RequestMapping("payment")
public class PaymentController {
    @GetMapping("index")
    public String index(){
        return "payment success";
    }

    @GetMapping("findById")
    public String findById(String id){
        return "payment success"+id;
    }

    @GetMapping("timeout")
    public String timeout(){
        try {
            TimeUnit.SECONDS.sleep(5000);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        return  "payment success";
    }

}
